<html>
<head>
    <meta charset="utf-8">
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>通知管理</title>
    <#assign base=request.contextPath />
    <base id="basePath" href="${base}">
    <link rel="stylesheet" href="${base}/frame/layui/css/layui.css">
    <script src="${base}/frame/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="${base}/frame/ztree/jquery-1.4.4.min.js"></script>
    <script src="${base}/js/jquery.min.js"></script>
    <script src="${base}/js/zhang.js"></script>
    <style type="text/css">
        .layui-btn-radius{
            border-radius: 5px;
        }
    </style>
</head>
<body>
<form class="layui-form" action="" style="margin: 10px">
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">选择日期</label>
            <div class="layui-input-inline">
                <input type="tel" id="time" name="time" lay-verify="required" autocomplete="off"
                       class="layui-input">
            </div>
        </div>

        <button class="layui-btn " data-method="offset" type="button"
                style="background-color: #0092EF;" onclick="onSubmint()">搜索
        </button>
        <button type="reset" class="layui-btn layui-btn-primary" onclick="reload()">重置</button>
    </div>
</form>
<table class="layui-hide" id="test"  lay-filter="test"></table>

<script>
    layui.use(['form', 'layedit', 'laydate', 'table', 'carousel'], function () {

        var carousel = layui.carousel;
        var form = layui.form
            , $ = layui.jquery
            , layer = layui.layer
            , layedit = layui.layedit
            , laydate = layui.laydate
            , table = layui.table;


        //执行一个laydate实例
        laydate.render({
            elem: '#time' //指定元素
        });

        //搜索
        var whereData = {};
        whereData.time=$("#time").val();


        table.render({
            elem: '#test'
            ,url:'${base}/admin/noticeOrder/noticeOrders'
            ,title: '通知管理'
            ,totalRow: true
            ,toolbar: '#toolbarDemo'//打印
            ,where: whereData
            ,cols:[[
                {field:'id', title: '序号',templet:function(val){
                        return val.LAY_INDEX
                    }, field: true,align:'center'}
                ,{field:'orderNumber', title: '订单号', align:'center'}
                ,{field:'username', title: '账户', align:'center'}

                ,{field:'content', title: '内容', align:'center'}
                ,{field:'orderMoeny', title: '支付金额',templet:function(val){
                        if(val.orderMoeny==""){
                            return "";

                        }
                        return val.orderMoeny/100;

                    },  align:'center'}

                ,{field:'createTime', title: '创建时间',templet:function(val){
                        if(val.createTime==undefined){
                            return "";
                        }
                        return changeDateFormat(val.createTime);
                    },  align:'center'}
                // ,{field: 'right', title:'操作',toolbar: '#barDemo', align:'center'}
            ]]
            ,id:'testReload'
            ,height:600
            ,page: {
                layout: ['limit', 'count', 'prev', 'page', 'next', 'skip'] //自定义分页布局
                ,theme: '#0092EF'
                ,limit:10
            }
        });
    });
    // 搜索
    function onSubmint() {
        var whereData = {};
        whereData.time=$("#time").val();
        //表刷新方法
        var table = layui.table;
        table.reload('testReload', {
            url: '${base}/admin/noticeOrder/noticeOrders'//数据接口
            , where: whereData
            //设定异步数据接口的额外参数
        });
    }
</script>

</body>
</html>